{
/* Someone else is updating validation of this page. Wait... */
while ( (y = page->u.inuse.type_info) == x )
- {
- rep_nop();
- barrier();
- }
+ cpu_relax();
goto again;
}
}
smp_threads_ready = 1;
smp_commence(); /* Tell other CPUs that state of the world is stable. */
while ( wait_init_idle != 0 )
- {
cpu_relax();
- barrier();
- }
#endif
watchdog_on = 1;
flush_cpumask = mask;
send_IPI_mask(mask, INVALIDATE_TLB_VECTOR);
while ( flush_cpumask != 0 )
- {
- rep_nop();
- barrier();
- }
+ cpu_relax();
spin_unlock(&flush_lock);
}
flush_cpumask = ((1 << smp_num_cpus) - 1) & ~(1 << smp_processor_id());
send_IPI_allbutself(INVALIDATE_TLB_VECTOR);
while ( flush_cpumask != 0 )
- {
- rep_nop();
- barrier();
- }
+ cpu_relax();
spin_unlock(&flush_lock);
}
smp_callin();
while (!atomic_read(&smp_commenced))
- rep_nop();
+ cpu_relax();
/*
* At this point, boot CPU has fully initialised the IDT. It is
/* Synchronous. */
while ( test_bit(DF_RUNNING, &d->flags) && !domain_runnable(d) )
- {
- smp_mb();
cpu_relax();
- }
}
void domain_wake(struct domain *d)
/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
static inline void rep_nop(void)
{
- __asm__ __volatile__("rep;nop");
+ __asm__ __volatile__ ( "rep;nop" : : : "memory" );
}
-#define cpu_relax() rep_nop()
+#define cpu_relax() rep_nop()
/* Prefetch instructions for Pentium III and AMD Athlon */
#ifdef CONFIG_MPENTIUMIII